import os

inputPath = input('请输入待搜索路径：')
pattern = input('请输入待搜索关键词：')

for dirpath, dirnames, filenames in os.walk(inputPath):
    for f in filenames:
        if pattern in f:
            print(f'{dirpath}/{f}')